<html>
    <head>
        <title>@yield('title')</title>
        <meta name="csrf-token" content="{{ csrf_token() }}">
        <link rel="stylesheet" type="text/css" href="{{asset('/static/plugin/css/bootstrap.min.css')}}">
        @section('css')
		 
		@show
    </head>
    <body>
        @section('header')
              <header>
          <nav class="navbar navbar-expand-md navbar-dark bg-dark">
              <div class="container">
                  <a class="navbar-brand" href="/">Coconut Q & A </a>

                  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="navbarsExample04" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                  </button>

                  <div class="collapse navbar-collapse" id="navbar">
                    <ul class="navbar-nav mr-auto">
                      <li class="nav-item">
                        <a class="nav-link" href="/">Home <span class="sr-only">(current)</span></a>
                      </li>
                      <li class="nav-item ">
                        <a class="nav-link" href="/hot">Hot</a>
                      </li>
                      <li class="nav-item">
                        <div class="form-inline my-3 my-md-0">
                            <input class="form-control"  id="keyword" type="text" placeholder="Search">
                        </div>
                      </li>
                    </ul>
                    @if(isset($username))
                      <div class="user-info" data-id="{{$userid}}">
                        {{$username or 'default'}}
                        <a href="{{ url('/logout') }}">Logout</a>
                     </div>
                    @else
                    <div class="login-register">
                         <a href="{{ url('/login') }}">Sign in</a>
                         |
                         <a href="{{ url('/register') }}">Sign up</a>
                    </div>
                    @endif
                  </div>


              </div>

         </nav>          
          </header>
        @show

        @section('sidebar')
          
        @show

        <div class="container">
            @yield('content')
        </div>


        @section('footer')

        @show
         

		<script src="{{asset('/static/plugin/jquery.js')}}"></script>	
		<script src="{{asset('/static/js/common.js')}}"></script>	

		@section('javascript')
		 
		@show


    </body>
</html>
